The present invention relates to an apparatus and a method for image compositing which give a realistic high resolution image with a simple structure.
Image compositing systems are often employed in broadcasting studios and film studios. In particular, chroma-key image compositing system is employed for television programs such as weather programs and news programs, films using special effects, and the like. Specifically, the subject to be composited is filmed or photographed with a background that has as different (far) color as possible from the colors of the subject. By identifying the difference of hues between the subject image and the background image and through waveform processing, key signals indicating the contour information of the subject are generated. Using the key signals, a subject image of the original image and the insertion portion of the desired background image are cut out. Then, the desired background and the subject image are integrated to give a composite image.
FIG. 32 is a pictorial view showing a positional relationship of a plurality of light sources 3203, a subject (person) 3201 and a back screen 3202 for general chroma-key processing. For chroma-key image compositing processing, blue (which is a complementary color to a skin color) cloth or a large blue polyester board 3202 is used as a back screen behind the subject 3201 for taking a film or a picture with a camera 3200. The plurality of light sources 3203 are placed so as to cast multi-directional light upon the subject 3201.
An image printing apparatus usually found on streets is described in, for example, Japanese Utility Model No. 3,034,012. FIG. 33 is a block diagram showing a configuration of one of such image printing apparatuses. These apparatuses have a similar system to an easy photographing machine (so-called a fast photographing machine) which prints a photographic image on a printing paper. These image printing apparatuses simply provide a from-a-waist-up portrait of the user, or composite a portrait of the user with an already-prepared background pattern (e.g., printed with a designed background, a designed frame, or designed characters) and print out the composite image in the form of printed stickers. Such an on-street apparatus has a canopy-like curtain in front of its faces for preventing external light from entering into the apparatus during photographing.
The conventional image printing apparatus configured as shown in FIG. 33 is provided with a CPU 3301; a manipulating section 3302 consisting of, for example, a touch panel, buttons and a joy stick; an image inputting device 3303 with a CCD camera and the like; a display 3304 for displaying user""s portrait (face image) and the like; a sound operator 3305 with a speaker and a sound ROM for producing synthesized sounds; a printer 3306 for printing a printing sheet or a sticker; a money control device 3307 with a coin selector and a coin detector for calculating the charge; a ROM 3308 for storing data of background patterns and compositing patterns, and a program for image compositing; an A/D converter 3310 for converting image signals of a user""s portrait (taken with the image inputting device 3303) into digital image data; an I/O interface 3311 for storing the converted image data in an image memory 3309; a RAM 3312 for editing the image data and the like; a hard disc 3313 for storing various data and the like; and an auxiliary memory 3314.
Generally, chroma-key processing in a broadcasting studio or a film studio requires a blue back screen behind the subject, and numbers of multi-directional light sources to prevent the shadow of the subject from casting on the back screen. Accordingly, chroma-keying requires considerable cost and sufficiently large studio space to equip the studio with sufficient number of light sources. Thus, image compositing through chroma-keying has been difficult in schools and local TV stations (e.g., CATV) since they are not able to afford sufficient equipment or space required for chroma-keying.
Chroma-keying in a studio or the like also has a problem in that the lighting conditions and the brightness of the back screen change if the subject moves, which later results in a poor composite image.
One may consider employing chroma-key processing in a conventional image printing apparatus to make a composite image look less artificial. However, since the space of the apparatus is limited, it is impossible to provide a plurality of multi-directional lighting sources in the apparatus for a shadow-free background.
In order to overcome the above-described problems, troublesome countermeasures have been taken. For example, the distance between the subject and the back screen is set as far as possible; light is made to directly cast upon the back screen; the clothing of the subject is selected avoiding similar color to the back screen; and the ranges of hue, saturation and brightness of the key color are set as wide as possible.
Since the conventional image printing apparatus simply overlays the portrait image of the subject with the desired background image, the resultant composite image looks less natural in that the subject image is not blended into the background image but floating thereon.
Thus, the object of the present invention is to provide an image compositing apparatus capable of producing a natural composite image, with a simple structure and a less occupying space.
The other object of the present invention is to provide a method for compositing an image by providing shadow-free conditions in a limited space for chroma-keying so that a subject image and a desired background image are naturally integrated as one image.
According to one embodiment of the present invention, an image compositing apparatus with a fare adjustment function is provided, which takes a picture of a subject, composites a foreground (subject) image of the picture with a background image, and prints out the composite image with a printer. The apparatus comprises: light panels provided behind the subject and on the floor, which uniformly emit uniform light with predetermined hue, saturation and brightness; a means for measuring the hue, saturation and the brightness of the light panels provided behind the subject and on the floor; a memory for memorizing the hue, saturation and the brightness of the light panels provided behind the subject and on the floor; an image extracting means for extracting the foreground image of the picture based on a color of a light panel behind the subject; an image compositing means for comparing and correcting saturation, brightness and hue distributions of the foreground image with respect to saturation, brightness and hue distributions of the background image, and compositing the foreground image with the background image; and an image display for displaying the resultant composite image.
According to another embodiment of the invention, an image compositing method is provided for taking a picture of a subject, compositing a foreground (subject) image of the picture with a background image by chroma-keying, and printing out the composite image with a printer. The method comprises the steps of: extracting the foreground image; memorizing saturation, brightness and hue distributions of the background image; and correcting saturation, brightness and hue distributions of the foreground image with respect to the saturation, brightness and hue distributions of the background image.